package com.ysd.lis.controller.inv;

import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.inv.InvManufacturer;
import com.ysd.lis.request.inv.InvManufacturerDto;
import com.ysd.lis.request.qc.ManufacturerPageParam;
import com.ysd.lis.service.inv.InvManufacturerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-09-11
 */
@Api(tags = "生产商")
@RestController
@RequestMapping("/lis/inv/manufacturer")
public class InvManufacturerController extends BaseController {

    @Autowired
    InvManufacturerService invManufacturerService;
    @ApiOperation("分页查询")
    @GetMapping("/findInvManufacturerPageList")
    public Result findInvManufacturerPageList(ManufacturerPageParam pageParam){
        return invManufacturerService.findInvManufacturerPageList(pageParam);
    }
    @ApiOperation("分页查询")
    @GetMapping("/findInvManufacturerList")
    public Result findInvManufacturerList(ManufacturerPageParam pageParam){
        return invManufacturerService.findInvManufacturerList(pageParam);
    }
    @ApiOperation("新增")
    @PostMapping("/addInvManufacturer")
    public Result addInvManufacturer(@RequestBody InvManufacturer manufacturer){
        return  invManufacturerService.addInvManufacturer(manufacturer);
    }

    @ApiOperation("修改")
    @PostMapping("/editInvManufacturer")
    public Result editInvManufacturer(@RequestBody InvManufacturer manufacturer) {
        return invManufacturerService.editInvManufacturer(manufacturer);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteInvManufacturer")
    public Result deleteInvManufacturer(@RequestBody InvManufacturer manufacturer) {
        return invManufacturerService.deleteInvManufacturer(manufacturer);
    }
    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteInvManufacturerList")
    public Result batchDeleteInvManufacturerList(@RequestBody InvManufacturerDto dto){
        return  invManufacturerService.batchDeleteInvManufacturerList(dto);
    }



}
